#[macro_use]
extern crate lazy_static;

extern crate core;

mod lox;
mod scanner;
mod util;
mod expr;
mod parser;
mod interpreter;
mod stmt;
mod callable;
mod resolver;

use std::env;
use std::path::Path;
use crate::lox::Lox;


fn main() {
    let args: Vec<String> = env::args().collect();
    let mut lox = Lox::new();
    if args.len() == 1 {
        lox.run_prompt();
    } else {
        lox.run_file(Path::new(&args[1]));
    }
}